<template>
    <div>
      <ul>
        <li @click="menav(item)" v-for="(item,index) in orgData" :key="index">
          <div class="top">
            <img :src="item.avatar" alt="数据加载失败">
            <!--<span>888人已加入学习</span>-->
          </div>
          <div class="bottom">
            <p>{{item.user_login}}</p>
            <p>{{item.signature}}</p>
          </div>
        </li>
      </ul>
    </div>
</template>

<script>
  import * as search from "../../../api/search.js"
    export default {
      name: "Organization",
      data(){
        return {
          orgData:[]
        }
      },
      beforeMount(){
        let parms = {type:1,user_id:this.$store.state.user_id};
        search.userSearch(parms).then(res=>{
          this.orgData = res.data;
        })
      },
      mounted(){
        mui.back = function() {
          window.history.go(-1);
        }
      },
      methods:{
        menav(item){
          this.$router.push({
            path: '/menav',
            query:{
              id:item.id
            }
          })
        }
      }
    }
</script>

<style scoped>
 ul{
   padding: 30px 40px;
   display: flex;
   justify-content: space-between;
   flex-wrap: wrap;
 }
 ul li{
   width: 47%;
   padding-bottom: 30px;
 }
 ul li .top{
   height: 180px;
   background: #dcdcdc;
 }
 /*ul li .top{*/
   /*position: relative;*/
 /*}*/
 ul li .top img{
   width: 100%;
   height: 180px;
   /*border-radius: 15px;*/
 }
 /*ul li .top span{*/
   /*position: absolute;*/
   /*bottom: 10px;*/
   /*left: 10px;*/
   /*font-size: 24px;*/
   /*color: #fff;*/
 /*}*/
 ul li .bottom p:nth-child(1){
   font-size: 28px;
   line-height: 36px;
 }
 ul li .bottom p:nth-child(2){
   font-size: 24px;
   line-height: 36px;
   color: #8c8c8c;
 }
</style>
